package com.andova.component;

import android.app.Application;

/**
 * Created by Administrator on 2017-12-08.
 *
 * @author kzaxil
 * @since 1.0.1
 */
public abstract class AndovaApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        onCreate(this, AndovaComponentManager.getInstance());
        AndovaComponentManager.getInstance().initialize(this);
    }

    @Override
    public void onLowMemory() {
        super.onLowMemory();
        onLowMemory(this, AndovaComponentManager.getInstance());
        AndovaComponentManager.getInstance().onLowMemory(this);
    }

    protected abstract void onCreate(Application cxt, AndovaComponentManager manager);

    protected abstract void onLowMemory(Application cxt, AndovaComponentManager manager);
}
